package com.mybatis.verification;

public class CheckMsg {

    public static int sendtocheck(String mobileNumber,String code) {
        /*返还值为1，2，3
        * 1 验证通过
        * 2 验证未通过
        * 3 发生异常*/
        try {
            String str = MobileMessageCheck.checkMsg(mobileNumber, code);
            if("success".equals(str)){

                System.out.println("验证成功！");
                return 0;
            }else{
                System.out.println("验证失败！");
                return 1;
            }


        } catch (Exception e) {
            e.printStackTrace();
            return 3;
        }
    }
}
